<?php
require_once("checklogin.php");
require_once("classQuanTriTin.php");
$qt = new quantritin;
$idDistrict=$_GET['idDistrict']; settype($idDistrict,"int");
if (isset($_POST['btnUpdate'])==true) {
	$qt ->UpdateDistrict($idDistrict);
	header("location:main.php?p=district_list");
}

$district = $qt->DetailDistrict($idDistrict);	
$row_district = mysql_fetch_assoc($district);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chỉnh thể loại</title>
<link href="../css/from_label.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form id="form1" name="form1" method="post" action="">
 <table width="500" id="themtheloai" border="0" align="center" cellpadding="4" cellspacing="0">
    <tr> <td colspan="2" align="center">
        <div id="from_label_left"></div>
  <div id="from_label_right"></div>
  <div id="from_label_center"><span id="header">CHỈNH QUẬN</span></div>
    </td> 
    </tr>
    <tr> <td width="194" align="right">Tên thể loại</td>
      <td width="298"><input type="text" name="Ten" id="Ten" value="<?=$row_district['name'];?>" /></td>
    </tr>
    <tr> <td width="194" align="right">Thứ tự</td>
      <td width="298"><input type="text" name="ThuTu" id="ThuTu" value="<?=$row_district['ThuTu'];?>" /></td>
    </tr>
    <tr> <td width="194" align="right">Ẩn hiện</td>
         <td width="298"> <input type="radio" name="AnHien" id="an" value="0"  <? echo ($row_district['AnHien']==0)? "checked=checked":""; ?> />Ẩn
             <input type="radio" name="AnHien" id="hien" value="1" <? echo ($row_district['AnHien']==1)? "checked=checked":""; ?>/>Hiện   </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
	<input type="reset" name="btnxoa" id="btnxoa" value=" Xoá " />&nbsp;
	<input type="submit" name="btnUpdate" id="btnUpdate" value="  OK  " />	</td>
    </tr>
  </table></form>
</body>
</html>
